<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- | This module exists to work nicely with the QualifiedDo</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- extension.</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- import qualified Language.Haskell.TH.CodeDo as Code</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- myExample :: Monad m =&gt; Code m a -&gt; Code m a -&gt; Code m a</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- myExample opt1 opt2 =</span><span>
</span><span id="line-7"></span><span class="hs-comment">--   Code.do</span><span>
</span><span id="line-8"></span><span class="hs-comment">--    x &lt;- someSideEffect               -- This one is of type `M Bool`</span><span>
</span><span id="line-9"></span><span class="hs-comment">--    if x then opt1 else opt2</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- @</span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Language.Haskell.TH.CodeDo</span><span class="hs-special">(</span><span class="annot"><a href="Language.Haskell.TH.CodeDo.html#%3E%3E%3D"><span class="hs-operator">(&gt;&gt;=)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Language.Haskell.TH.CodeDo.html#%3E%3E"><span class="hs-operator">(&gt;&gt;)</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Language.Haskell.TH.Syntax.html"><span class="hs-identifier">Language.Haskell.TH.Syntax</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier">Monad</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-comment">-- | Module over monad operator for 'Code'</span><span>
</span><span id="line-17"></span><span id="local-6989586621679167747"><span id="local-6989586621679167748"><span id="local-6989586621679167749"><span class="annot"><a href="Language.Haskell.TH.CodeDo.html#%3E%3E%3D"><span class="hs-operator hs-type">(&gt;&gt;=)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167749"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679167749"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167748"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679167748"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Language.Haskell.TH.Syntax.html#Code"><span class="hs-identifier hs-type">Code</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167749"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167747"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Language.Haskell.TH.Syntax.html#Code"><span class="hs-identifier hs-type">Code</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167749"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167747"><span class="hs-identifier hs-type">b</span></a></span></span></span></span><span>
</span><span id="line-18"></span><span id="%3E%3E%3D"><span class="annot"><span class="annottext">&gt;&gt;= :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
m a -&gt; (a -&gt; Code m b) -&gt; Code m b
</span><a href="Language.Haskell.TH.CodeDo.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var">(&gt;&gt;=)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; (a -&gt; Code m b) -&gt; Code m b
forall (m :: * -&gt; *) a b.
Monad m =&gt;
m a -&gt; (a -&gt; Code m b) -&gt; Code m b
</span><a href="Language.Haskell.TH.Syntax.html#bindCode"><span class="hs-identifier hs-var">bindCode</span></a></span><span>
</span><span id="line-19"></span><span id="local-6989586621679167737"><span id="local-6989586621679167738"><span id="local-6989586621679167739"><span class="annot"><a href="Language.Haskell.TH.CodeDo.html#%3E%3E"><span class="hs-operator hs-type">(&gt;&gt;)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167739"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679167739"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167738"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Language.Haskell.TH.Syntax.html#Code"><span class="hs-identifier hs-type">Code</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167739"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167737"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Language.Haskell.TH.Syntax.html#Code"><span class="hs-identifier hs-type">Code</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167739"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679167737"><span class="hs-identifier hs-type">b</span></a></span></span></span></span><span>
</span><span id="line-20"></span><span id="%3E%3E"><span class="annot"><span class="annottext">&gt;&gt; :: forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; Code m b -&gt; Code m b
</span><a href="Language.Haskell.TH.CodeDo.html#%3E%3E"><span class="hs-operator hs-var hs-var">(&gt;&gt;)</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m a -&gt; Code m b -&gt; Code m b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; Code m b -&gt; Code m b
</span><a href="Language.Haskell.TH.Syntax.html#bindCode_"><span class="hs-identifier hs-var">bindCode_</span></a></span><span>
</span><span id="line-21"></span></pre></body></html>